package net.hzlj.platform.enterprise.beans;

import net.hzlj.platform.enterprise.utils.StringUtils;

import java.io.Serializable;

/****
 * @ClassName: UserInfoBean
 * @Description: 用户信息
 * @Author: Jason.Zhang zhangyujn1989ok@gmail.com
 * @Date: 2015-7-27 10:02:36
 */
public class UserBean implements Serializable {

    /**
     * 矫正人员bean
     */
    private static final long serialVersionUID = -8868510680710301312L;
    /** 人员ID */
    private Integer id;
    /** 档案号 */
    private String fileNumber;
    /** 姓名 */
    private String name;
    /** 性别:1男,2女 */
    private String sex;
    /** 矫正类型:1管制,2缓刑,3假释,4暂予监外执行,5剥夺政治权利 */
    private String correctType;
    /** 管理等级:1普管,2宽管,3严管 */
    private String manageGrade;
    /** 入矫日期 */
    private String correctBegin;
    /** 解矫日期 */
    private String solveDate;
    /** 联系电话 */
    private String telephone;
    /** 隶属机构Id */
    private String registeredId;
    /** 司法所 */
    private String registered;
    /** 身份证 */
    private String identityNO;
    /** 密码 */
    private String password;
    /**用户头像*/
    private String uploadUrl;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getFileNumber() {
        return fileNumber;
    }

    public void setFileNumber(String fileNumber) {
        this.fileNumber = fileNumber;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCorrectBegin() {
        return correctBegin;
    }

    public void setCorrectBegin(String correctBegin) {
        this.correctBegin = correctBegin;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getSex() {
        return StringUtils.isNotEmpty(sex) && "2".equals(sex) ? "女" : "男";
    }

    public String getSolveDate() {
        return solveDate;
    }

    public void setSolveDate(String solveDate) {
        this.solveDate = solveDate;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getRegistered() {
        return registered;
    }

    public void setRegistered(String registered) {
        this.registered = registered;
    }

    public String getIdentityNO() {
        return identityNO;
    }

    public void setIdentityNO(String identityNO) {
        this.identityNO = identityNO;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getCorrectType() {
        //1管制,2缓刑,3假释,4暂予监外执行,5剥夺政治权利
        if ("1".equals(correctType)){
            correctType = "管制";
        }else if ("2".equals(correctType)){
            correctType = "缓刑";
        }else if ("3".equals(correctType)){
            correctType = "假释";
        }else if ("4".equals(correctType)){
            correctType = "暂予监外执行";
        }else if ("5".equals(correctType)){
            correctType = "剥夺政治权利";
        }
        return correctType;
    }

    public void setCorrectType(String correctType) {
        this.correctType = correctType;
    }

    public String getManageGradeDescription() {
        //管理等级:1普管,2宽管,3严管
        if ("1".equals(manageGrade)){
            return "普管";
        }else if ("2".equals(manageGrade)){
            return "宽管";
        }else if ("3".equals(manageGrade)){
            return "严管";
        }
        return "";
    }

    public String getManageGrade() {
        //管理等级:1普管,2宽管,3严管
        return manageGrade;
    }

    public void setManageGrade(String manageGrade) {
        this.manageGrade = manageGrade;
    }

    public String getRegisteredId() {
        return registeredId;
    }

    public void setRegisteredId(String registeredId) {
        this.registeredId = registeredId;
    }

    public String getUploadUrl() {
        return uploadUrl;
    }

    public void setUploadUrl(String uploadUrl) {
        this.uploadUrl = uploadUrl;
    }

    @Override
    public String toString() {
        return "UserBean{" +
                "id=" + id +
                ", fileNumber='" + fileNumber + '\'' +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", correctType='" + correctType + '\'' +
                ", manageGrade='" + manageGrade + '\'' +
                ", correctBegin='" + correctBegin + '\'' +
                ", solveDate='" + solveDate + '\'' +
                ", telephone='" + telephone + '\'' +
                ", registeredId='" + registeredId + '\'' +
                ", registered='" + registered + '\'' +
                ", identityNO='" + identityNO + '\'' +
                ", password='" + password + '\'' +
                ", uploadUrl='" + uploadUrl + '\'' +
                '}';
    }
}
